﻿using Abp.Application.Services;
using GN.Pay.Client.Notify;
using GN.Pay.Client.Response.Trade;
using GNBaseService.PayDemo.OrderApp.Dto.Input;
using GNBaseService.PayDemo.OrderApp.Dto.Output;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GNBaseService.PayDemo.OrderApp
{
    /// <summary>
    /// 订单应用服务
    /// </summary>
    public interface IOrderAppService : IApplicationService
    {
        /// <summary>
        /// 订单的支付申请，通过客户端提交订单号，
        /// 获取申请号，再将申请号向支付系统网关提交，
        /// 向客户端展示支付页面
        /// </summary>
        /// <param name="input">输入</param>
        /// <returns></returns>
        OrderPayApplyOutput OrderPayApply(OrderPayApplyInput input);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="orderNo"></param>
        /// <returns></returns>
        TransfersApplyResponse TransfersApply(string orderNo);

        /// <summary>
        /// 订单支付通道申请，指由客户端已明确指定哪种支付方式进行支付，
        /// 特别是原生支付，或自行实现支付界面则调用此函数，该函数将直接返回
        /// 第三方的已签名支付脚本或支付参数，直接向第三方控件(app)或调用脚本支付。
        /// </summary>
        /// <param name="input">输入</param>
        /// <returns></returns>
        OrderPayChannelApplyOutput OrderPayChannelApply(OrderPayChannelApplyInput input);

        /// <summary>
        /// 付款通知，不可对外开放WebApi
        /// </summary>
        /// <param name="message"></param>
        void PayNotify(PayNotifyMessage message);

        /// <summary>
        /// 退款通知，不可对外开放WebApi
        /// </summary>
        /// <param name="message"></param>
        void RefundNotify(RefundNotifyMessage message);

    }
}
